< previous page page_31 next page >

Page 31
Q&A
Q What is a class?
A A class is an abstract entity that carries out a subset of your user's requirements.
Q What is an abstraction?
A An abstraction is the hiding of an object's private information and operations. Requests for information and services (via operations or methods) must occur by invoking public methods, including Visual Basic's property methods.
Q What is the purpose of class attributes?
A The purpose of attributes is to hold the current state of a class instance.
Workshop
The workshop includes quiz questions to help gauge your grasp of the material. Even if you feel that you totally understand the concepts presented here, you should work through the quiz anyway. The last section is an exercise or two to help reinforce your learning. You'll find the answers to the quiz in Appendix A, Answers.
Quiz
1. What is one of the chief benefits of object-oriented programming?
2. What is the importance of behavior?
3. Describe the roles that the keywords Public and Private play in encapsulation?
Exercises
1. Borrowing from the Sebring example, create a list of other subsystems in cars that might be applicable.
2. Again borrowing from the Sebring example, create a list of other properties a car might have. Also, describe what events might change the property values of a car. For instance, the event of driving makes the property Gas Level decrease until the gas tank is empty.

 
< previous page page_31 next page >

If you like this book, buy it!